"""
@author: wtf
@file: config.py
@time: 2024/5/8 16:09
"""
import os

# 配置地址和端口号

# 配置数据库信息
HOSTNAME = "127.0.0.1"
PORT = 3306
USERNAME = "root"
PASSWORD = 1234
DATABASE = "zhiliaooa"
DB_URI = f'mysql+pymysql://{USERNAME}:{PASSWORD}@{HOSTNAME}:{PORT}/{DATABASE}?charset=utf8'
SQLALCHEMY_DATABASE_URI = DB_URI

# 邮箱配置
MAIL_SERVER = "smtp.qq.com"  # qq邮箱
MAIL_USE_SSL = True  # 是否加密
MAIL_PORT = 465  # 端口号
MAIL_USERNAME = "2416224351@qq.com"  # 邮箱账号
MAIL_PASSWORD = "hheveboxgpjneadd"  # 生成的授权码
MAIL_DEFAULT_SENDER = "2416224351@qq.com"  # 使用账号

# 配置session的SECRET_KEY
SECRET_KEY = "anbigious"

# 获取项目绝对路径

BASE_DIR = os.path.dirname(__file__)
PHOTO_DIR = os.path.join(BASE_DIR, "static/photos")


# qiniu配置
qiniu_AccessKey = "giiztdL8FGVa3v3tKEXKsoeqvfn0OY4ncSO8AjPU"
qiniu_SecretKey = "l873G_fYvnxu34lESfPLeO7xA2IdP9nSuOapD5K0"
